package com.cuit.riskassessment.service.impl;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cuit.riskassessment.dao.rb.RbMapper;
import com.cuit.riskassessment.service.RbService;
import com.cuit.riskassessment.vo.Rb;


@Service(value="rbService")
public class RbServiceImpl implements RbService{
	@Autowired
	@Resource(name="rbMapper")
	private RbMapper rbMapper;

	@Override
	public boolean addRb(Rb rb) {
		if (rb.getId()==null) {
			if(rbMapper.addRb(rb)>0)return true;
		}else {
			if(rbMapper.updateRb(rb)>0)return true;
		}
		return false;
	}

	@Override
	public Rb setRb(Integer pid) {
		return rbMapper.setRb(pid);
	}
}
